package com.pattern.learn.策略模式;

public class OperationMul implements Strategy {

    @Override
    public int doOperation(int num1, int num2) {
        long l = (long) num1 * (long) num2;
        if (l > Integer.MAX_VALUE) {
            throw new RuntimeException("超出 int 最大值");
        }
        return num1 * num2;
    }
}
